/**
 * 
 */
package Controller;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;

import javax.swing.JFileChooser;

/**
 * @author enzo
 *
 */
public class PreviewListener implements PropertyChangeListener {

	private AgendaManager agenda;
	/**
	 * @param a
	 */
	public PreviewListener(AgendaManager a)
	{
		agenda=a;
		
	}
	/* (non-Javadoc)
	 * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
	 */
	@Override
	public void propertyChange(PropertyChangeEvent evt) {
		// TODO Auto-generated method stub
		if (evt.getPropertyName().equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) agenda.preview();
	}

}
